<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

<?php
if(isset($_POST['submit'])){
    require_once 'model/works.php';
    $md_sanpham=new Works();
//    var_dump($_FILES["file"]);
//    if(move_uploaded_file($_FILES['file']['tmp_name'],"public/images/".$_FILES["file"]["name"])){
        $flag=array(
            'name'=>$_POST['name'],
            'url'=>$_POST['url'],
            'posted'=>$_POST['posted'],
            'location'=>$_POST['location'],
            'description'=>$_POST['description'],
            'experience_requirements'=>$_POST['experience_requirements'],
            'company_name'=>$_POST['company_name'],
            'company_address'=>$_POST['company_address'],  
            'company_profile'=>$_POST['company_profile'],
//            'id_site'=>$_POST['id_site'],
//            'image'=>"public/images/".$_FILES["file"]["name"]
//            'image'=>$_FILES['file']['name'],
        );
        var_dump($md_sanpham->insert($flag));
//    }
}
?>

<form enctype="multipart/form-data" method="post">
    <table border="0">
        <tr>
            <td>Tên ct</td>
            <td><input type="text" name="name"></td>
        </tr>
        <tr>
            <td>Url:</td><td> <input type="text" name="url"></td>
        </tr>
        <tr>
            <td>posted</td><td> <input type="text" name="posted"></td>
        </tr>
         <tr>
            <td>location </td><td><input type="text" name="location"></td>
        </tr>
         <tr>
            <td>description</td><td><input type="text" name="description"></td>
        </tr>
         <tr>
            <td>experience_requirements</td><td><input type="text" name="experience_requirements"></td>
        </tr>
         <tr>
            <td>company_name</td><td><input type="text" name="company_name"></td>
        </tr>
         <tr>
            <td>company_address</td><td><input type="text" name="company_address"></td>
        </tr>
         <tr>
            <td>company_profile</td><td><input type="text" name="company_profile"></td>
        </tr>
<!--         <tr>
            <td>id_site</td><td><input type="text" name="id_site"></td>
        </tr>-->
        
<!--    <tr><td>Hình Ảnh: </td><td> <input type="file" name="file"><br></td></tr>    -->
    <tr><td></td><td><input type="submit" name="submit" value="Add"></td></tr>
</form>

